<template>
  <div class="dashboard-editor-container">
    <div class="box">
      <img src="@/assets/images/dashboard-nodata.png" alt="d" />
      <h2 style="color: #888">暂无合同数据</h2>
    </div>
  </div>
</template>

<script>
import echarts from "echarts";
import PanelGroup from "@/views/dashboard/admin/components/PanelGroup";
import LineChart from "@/views/dashboard/admin/components/LineChart";
import CountTo from "vue-count-to";
import { saleDetail } from "@/api/home";

export default {
  name: "DashboardAdmin",
  components: {
    PanelGroup,
    LineChart,
    CountTo,
  },
  created() {
    this.getSaleDetail();
  },
  data() {
    return {
      saleIndex: {
        createOppoTotal: null,
        oppoTurnTotal: null,
        oppoTurnRate: null,
        oppoInteractionQuantity: null,
        salesFollowQuantity: null,
      },
      dialogVisible: false,
      value1: "",
      charts: "",
      opinionData: ["3", "2", "4", "4", "5"],
      massageList: [
        { title: "【通知】中秋国庆双节放假通知", listDate: "2020-09-19" },
        {
          title: "【公告】你好朋友，感谢使用 管理平台新版本",
          listDate: "2020-09-18",
        },
        {
          title: "【通知】月饼发放通知，请各部门主管到行政部领取",
          listDate: "2020-09-17",
        },
        { title: "【公告】本季度销售之星名单公示", listDate: "2020-09-16" },
        {
          title: "【通知】公司上班时间调整通知，下月执行",
          listDate: "2020-09-15",
        },
        { title: "【公告】公司新上任总裁任命书", listDate: "2020-09-14" },
        { title: "【公告】午餐补贴通知，本月生效", listDate: "2020-09-13" },
        { title: "【通知】公司技术交流培训课通知", listDate: "2020-09-12" },
        {
          title: "【通知】关于公司组织员工秋季旅游通知",
          listDate: "2020-09-11",
        },
      ],
    };
  },
  computed: {
    sysConfig() {
      return this.$store.state.settings.sysConfig;
    },
  },
  methods: {
    // 获取首页信息
    getSaleDetail() {
      saleDetail().then((res) => {
        this.saleIndex = res.data;
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.sale {
  background: #fff;
  margin-bottom: 10px;
  border-radius: 4px;
  .sale_title {
    padding-top: 16px;
    padding-left: 22px;
    span {
      &:first-child {
        font-size: 16px;
        font-weight: bold;
        color: #333;
        margin-right: 10px;
      }
      &:nth-child(2) {
        color: #999;
        font-size: 12px;
      }
    }
  }
  .sale_items {
    display: flex;
    justify-content: space-around;
    padding: 34px 0;
    li {
      display: flex;
      flex-direction: column;
      text-align: center;
      .nums {
        font-size: 26px !important;
        padding-top: 13px;
        padding-bottom: 9px;
        color: #1890ff;
        font-weight: 600;
        span {
          font-size: 26px !important;
          padding-top: 13px;
          padding-bottom: 9px;
          color: #1890ff !important;
          font-weight: 600;
        }
      }
      .lastnums {
        font-size: 26px !important;
        padding-top: 13px;
        padding-bottom: 9px;
        font-weight: 600;
        color: #333;
      }
      &:first-child {
        span:last-child {
          color: #08b41f;
        }
      }
      &:nth-child(4) {
        span {
          &:last-child {
            color: #08b41f;
          }
        }
      }
      &:nth-child(2) {
        span {
          &:last-child {
            color: #b40808;
          }
        }
      }
      &:nth-child(3) {
        span {
          &:last-child {
            color: #999;
          }
        }
      }
      &:last-child {
        span {
          &:last-child {
            color: #000;
          }
        }
      }
      span {
        &:nth-child(2) {
          font-size: 26px !important;
          padding-top: 13px;
          padding-bottom: 9px;
          color: #1890ff;
          font-weight: 600;
        }
        &:nth-child(3) {
          font-size: 12px;
        }
      }
    }
  }
}
.notice {
  padding-bottom: 20px;
  .notice_title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    padding: 0 25px;
    .title_left {
      display: flex;
      align-items: center;
      span {
        font-size: 16px;
        font-weight: bold;
        color: #333;
      }
    }
    .title_right {
      font-size: 12px;
      color: #999;
      line-height: 30px;
    }
  }
  .notice_right {
    background: #fff;
    height: 400px;
    border-radius: 4px;
    overflow: hidden;
    .no_right_massage {
      li {
        display: flex;
        background: #fff;
        border: 1;
        height: 170px;
        border-top: 1px solid #f2f2f5;
        .right_item {
          width: 50%;
          padding: 16px 20px;
          display: flex;
          flex-direction: column;
          justify-content: space-between;
          .right-top {
            font-size: 14px;
            display: flex;
            align-items: center;
            img {
              margin-right: 10px;
            }
          }
          p {
            font-size: 14px;
            line-height: 22px;
            padding: 20px 0;
            color: #999;
            display: -webkit-box;
            line-clamp: 3;
            -webkit-line-clamp: 3;
            overflow: hidden;
            text-overflow: ellipsis;
            /*! autoprefixer: off */
            -webkit-box-orient: vertical;
            /* autoprefixer: on */
          }
          .bt {
            display: flex;
            justify-content: space-between;
            font-size: 12px;
            color: #999;
          }
        }
        .linet {
          border-left: 1px solid #f2f2f5;
        }
      }
    }
  }
  .notice_left {
    background: #fff;
    height: 400px;
    border-radius: 4px;
    overflow: hidden;
    .no_left_massage {
      height: 340px;
      padding: 10px 20px;
      border-top: 1px solid #f2f2f5;
      ul {
        li {
          display: flex;
          justify-content: space-between;
          font-size: 14px;
          color: #303133;
          padding: 10px 0;
          cursor: pointer;
          p {
            width: calc(100% - 80px);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
          }
          .time {
            width: 80px;
            display: inline-block;
            text-align: right;
            color: #999999;
          }
        }
      }
    }
  }
}

.componey {
  font-size: 12px;
  text-align: center;
  color: #999;
  padding-bottom: 10px;
}

.dashboard-editor-container {
  background-color: #ebeef5;
  position: relative;
  width: 100%;
  overflow: hidden;

  .github-corner {
    position: absolute;
    top: 0px;
    border: 0;
    right: 0;
  }

  .chart-wrapper {
    background: #fff;
    padding: 16px 16px 0;
    margin-bottom: 20px;
  }
}
.dateSelect {
  position: absolute;
  right: 67px;
  top: 38px;
  z-index: 100;
  .el-date-editor {
    width: 160px;
  }
}
@media (max-width: 1024px) {
  .chart-wrapper {
    padding: 8px;
  }
}

.box {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  img {
    width: 30%;
  }
}
</style>
